Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Room: First Spell Part #6044

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft

Room: First Spell Part #6044

wants to merge 14 commits into from

Conversation

Hanmac
Copy link
Contributor

@Hanmac Hanmac commented Sep 3, 2024

Closes #6033

  • Split Parts can be cast, and they enter the battlefield
  • Visual they are off right now, but the ability work (static and trigger)
  • Special all-locked State Missing
  • Unlock Door Special Action Missing
  • Unlock Door and Fully Unlock Room Trigger Missing
    • Unlock this Door should look for the CardState property of the Special Action

@Hanmac
Copy link
Contributor Author

Hanmac commented Sep 3, 2024

I will add Unlock Door Param/Action for SetState.

With this, I can better control into which state it should change:

  • EmptyRoom → LeftSide → DefaultSide (both)
  • EmptyRoom → RightSide → DefaultSide (both)

@tool4ever
Copy link
Contributor

One thing that might be different is that old Split cards could have different types.
But now it seems to be shared?
So even in empty state it still needs to be a Room Enchantment? 🤔

@Hanmac
Copy link
Contributor Author

Hanmac commented Sep 3, 2024

One thing that might be different is that old Split cards could have different types. But now it seems to be shared? So even in empty state it still needs to be a Room Enchantment? 🤔

The empty state will be room specific, so it will not collide with old split cards

@Hanmac
Copy link
Contributor Author

Hanmac commented Sep 8, 2024

@tool4ever added Unlock Action and Unlock Trigger (might add more info like GameLog Message?)

I haven't tested it yet with clone Effects.

@kevlahnota really need to help me to fix the visual on the battlefield

@Hanmac
Copy link
Contributor Author

Hanmac commented Sep 13, 2024

@tool4ever can you help me to wire it what should happen if a something becomes a copy of a Room, or a Room becomes a copy of another Room?

@tool4ever
Copy link
Contributor

tool4ever commented Sep 15, 2024

Needed to fix this crash when copying permanent:

EDT > java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
	at forge.card.CardDb$CardRequest.fromString(CardDb.java:203)
	at forge.card.CardDb.getCard(CardDb.java:541)
	at forge.view.arcane.CardPanel.displayIconOverlay(CardPanel.java:487)
	at forge.view.arcane.CardPanel.paintChildren(CardPanel.java:368)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1128)
	at forge.view.arcane.CardPanel.paint(CardPanel.java:277)

@Hanmac
Copy link
Contributor Author

Hanmac commented Sep 27, 2024

@tool4ever @Agetian @tehdiplomat i need some better logic for "Choose Door to unlock"

my function needs the CardStateName, but the GUI function might want the ICardFace name?

}
String faceName = c.getState(faceStateName).getName();
ICardFace face = StaticData.instance().getCommonCards().getFaceByName(faceName);
map.put(face, faceStateName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like at least on Desktop GuiChoose should accept a list of CardStateView just fine...
might be worth a shot to see how it'd display, then doing it without the Map seems possible 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to be careful with that, because for Network, the object needs to be Serializeable

if you can get CardStateView working, then you could try this too

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it does extend TrackableObject so like all View classes I except it can be serialized

@tool4ever
Copy link
Contributor

I checked out the card rendering and the way split states get handled makes drawing something meant for both a bit tricky (this could also work with Fuse)
I think the best I could do for now is skip right for the "shared type line" if you think that helps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

DSK: Room Mechanic
2 participants